const ip = /^((2[0-4][0-9])|(25[0-5])|(1[0-9]{0,2})|([1-9][0-9])|([1-9]))\.(((2[0-4][0-9])|(25[0-5])|(1[0-9]{0,2})|([1-9][0-9])|([0-9]))\.){2}((2[0-4][0-9])|(25[0-5])|(1[0-9]{0,2})|([1-9][0-9])|([1-9]))$/;
const mac = /^[A-Fa-f0-9]{12}$/
const ipFn = (val) => {

    return ip.test(val);
};const isMac = (val) => {

    return mac.test(val);
};


module.exports = {
    ipFn,
    ip,
    mac,
    isMac
};